﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Users.aspx.cs" Inherits="FtpWebRole.Users" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Add User</h2>
    <table>
        <tr>
            <td><asp:Label runat="Server">Name:</asp:Label></td>
            <td><asp:TextBox ID="TextBox1" runat="Server" Width="100"></asp:TextBox></td>    
        </tr>
        <tr>
            <td><asp:Label runat="Server">Password:</asp:Label></td>
            <td><asp:TextBox ID="TbxPswd1" runat="Server" Width="100" TextMode="Password"></asp:TextBox></td>    
        </tr>
        <tr>
            <td><asp:Label runat="Server">Confirm Password:</asp:Label></td>
            <td><asp:TextBox ID="TbxPswd2" runat="Server" Width="100" TextMode="Password"></asp:TextBox></td>    
        </tr>
    </table>
    <asp:Button ID="AddButton" runat="Server" onClick="AddButton_Click" Text="Add" />
    <asp:Label ID="Label1" runat="Server"></asp:Label>

    <h2>All Users</h2>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        OnRowDeleting="GridView1_RowDeleting">
        <Columns>
            <asp:BoundField DataField="Name" HeaderText="Name" />    
            <asp:BoundField DataField="TimeStamp" HeaderText="Created" />
            <asp:TemplateField HeaderText="Main Directory">
                <ItemTemplate>
                    <asp:RadioButton ID="RbtnShared" Text="Shared" GroupName="GrpMainDir" OnCheckedChanged="Rbtn_CheckedChanged"
                        runat="server" Checked='<%# Eval("IsShared")%>' AutoPostBack="True" />
                    <asp:RadioButton ID="RbtnPrivate" Text="Private" GroupName="GrpMainDir" OnCheckedChanged="Rbtn_CheckedChanged"
                        runat="server" Checked='<%# !(bool)Eval("IsShared")%>' AutoPostBack="True" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField ShowHeader="False">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton1" runat="Server" CommandName="Delete" Text="Delete" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
</asp:Content>
